/*
 * @Author: yangni 920556271@qq.com
 * @Date: 2023-12-07 09:26:03
 * @LastEditors: yangni 920556271@qq.com
 * @LastEditTime: 2023-12-20 10:44:11
 * @FilePath: /yt-devops/lib/pages/tasks/component/title_widget.dart
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import 'package:flutter/material.dart';
import 'package:yt_devops/styles/styles.dart';

class TitleWidget extends StatelessWidget {
  final String title;
  final TextStyle? titleStyle;
  final String? value;
  const TitleWidget(this.title, {super.key, this.titleStyle, this.value});

  @override
  Widget build(BuildContext context) {
    return Container(
        padding: const EdgeInsets.only(top: 16, bottom: 14),
        child: Row(
          mainAxisAlignment: MainAxisAlignment.spaceBetween,
          children: [
            Text(title, style: titleStyle ?? TextStyles.f18.mediumStyle),
            if (value != null) Text(value!, style: TextStyles.f14),
          ],
        ));
  }
}
